<?php
//require_once  __DIR__ . '/includes/authenticate.php';

if (isset($_POST['category']) && isset($_POST['text']) ) {
	
	include_once './db_bb_connect.php';

	$category = $_POST['category'];
	$text = $_POST['text'];
	$visibility = $_POST['visibility'];

	$sql = "INSERT INTO attentionpointsteams (category, text, visibility)
	VALUES ('$category', '$text', '$visibility')";

	if ($db->query($sql)){
		echo "<br><center> Attention point succesfully added! </center>";
	} else {
		echo "Something went wrong, tip not added";
		echo "Error: " . $sql . "<br>" . $db->error;
	};

}


?>